package com.ssm.service.Impl;

import com.ssm.dao.UserMapper;
import com.ssm.entity.User;
import com.ssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAllUser() {
        System.out.println("Service业务层：查询所有用户...");
        return userMapper.findAllUser();
    }

    @Override
    public void insertUser(User user) {
        System.out.println("Service业务层：添加用户...");
        userMapper.insertUser(user);
    }
}
